package edu.sysu.cshare.util;

import javax.swing.JDialog;
import javax.swing.UIManager;

public class GUI {

	public static void showModalDialog(JDialog dialog){
		dialog.toFront();
		dialog.setModal(true);
		dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		dialog.setVisible(true);
	}
	
	 public static void setUIFont(javax.swing.plaf.FontUIResource f) {  
	        java.util.Enumeration keys = UIManager.getDefaults().keys();  
	        while (keys.hasMoreElements()) {  
	            Object key = keys.nextElement();  
	            Object value = UIManager.get(key);  
	            if (value instanceof javax.swing.plaf.FontUIResource)  
	                UIManager.put(key, f);  
	        }  
	    } 
}
